#pragma once

#include "..\stdafx.h"
#include "sqlite.h"


class CDbProxy: public SQLite {
	// Public methods
public:
	CDbProxy() { m_isValid = m_isValidMsgDisplayed = m_isTransaction = FALSE; };

	int Open(CString dbFile);
	int Execute(CString query);
	BOOL isValid();
	void Invalidate() { m_isValid = FALSE; m_isValidMsgDisplayed = TRUE; };
	int BeginTransaction();
	int Commit();
	int Rollback();
	BOOL isTransaction() { return m_isTransaction; };

private:
	BOOL m_isValid;
	BOOL m_isValidMsgDisplayed;
	BOOL m_isTransaction;
};

